package cn.isjinhao.se.sql.grammar.statement;

import cn.isjinhao.se.sql.grammar.CurdStatement;
import cn.isjinhao.se.sql.grammar.CurdStatementVisitor;
import cn.isjinhao.se.sql.lexical.token.Token;

/**
 * @Author ISJINHAO
 * @Date 2021/7/26 23:16
 */
public class TimeInterval extends CurdStatement {

    private Token type;

    private Long interval;

    public TimeInterval(Token type, Long interval) {
        this.type = type;
        this.interval = interval;
    }

    @Override
    public <R> R accept(CurdStatementVisitor<R> curdStatementVisitor) {
        return curdStatementVisitor.visitTimeInterval(this);
    }

    public Token getType() {
        return type;
    }

    public Long getInterval() {
        return interval;
    }

}
